/**
 * Created by Administrator on 2017/10/10.
 */
Utils.historyBack();
function getxx() {
    $.ajax({
        type : "GET",
        url : getRequestUrl("/user/get_self_detail"),
        success : function(datas) {
            console.log(datas);
            var arr=datas.response_params.result;
            //pages=datas.response_params.total_cnt;
            isFirst=arr.is_first_register;
            $("#name").val(arr.nick_name);

            var sex="";
            if(arr.gender==1){
                sex="男"
            }else {
                sex="女"
            }
            $("#sex").val(sex).attr("data-id",arr.gender);
            if(arr.is_first_register==1){

            }else {
                $("#showDatePicker").val(arr.birth_date.substring(0,10));
                var str="";
                if(arr.zodiac_sign==1){
                    str="白羊座"
                }else if(arr.zodiac_sign==2){
                    str="金牛座"
                }else if(arr.zodiac_sign==3){
                    str="双子座"
                }else if(arr.zodiac_sign==4){
                    str="巨蟹座"
                }else if(arr.zodiac_sign==5){
                    str="狮子座"
                }else if(arr.zodiac_sign==6){
                    str="处女座"
                }else if(arr.zodiac_sign==7){
                    str="天秤座"
                }else if(arr.zodiac_sign==8){
                    str="天蝎座"
                }else if(arr.zodiac_sign==9){
                    str="射手座"
                }else if(arr.zodiac_sign==10){
                    str="摩羯座"
                }else if(arr.zodiac_sign==11){
                    str="水瓶座"
                }else if(arr.zodiac_sign==12){
                    str="双鱼座"
                }
                $("#sg").val(arr.height);
                $("#xz").val(str).attr("data-id",arr.zodiac_sign);
                var str1="";
                if(arr.income==1){
                    str1="5-10W"
                }else if(arr.income==2){
                    str1="10-20W"
                }else if(arr.income==3){
                    str1="20-30W"
                }else if(arr.income==4){
                    str1="30-40W"
                }else if(arr.income==5){
                    str1="40-50W"
                }else if(arr.income==6){
                    str1="50-60W"
                }else if(arr.income==7){
                    str1="60W以上"
                }
                $("#nsr").val(str1).attr("data-id",arr.income);
                var str2="";
                if(arr.marital_status==1){
                    str2="未婚"
                }else if(arr.marital_status==2){
                    str2="离异"
                }else if(arr.marital_status==3){
                    str2="丧偶"
                }
                $("#hyzt").val(str2).attr("data-id",arr.marital_status);
            }
            var str3="";
            if(arr.education==1){
                str3="中专以下"
            }else if(arr.education==2){
                str3="专科"
            }else if(arr.education==3){
                str3="本科"
            }else if(arr.education==4){
                str3="硕士"
            }else if(arr.education==5){
                str3="博士"
            }
            $("#zgxl").val(str3).attr("data-id",arr.education);
            $("#grjj").val(arr.profile);
            $("#hy").val(arr.industry);
            $("#gsname").val(arr.company);
            $("#zhiwei").val(arr.position);
            $("#weixin").val(arr.wx_account);
            $("#gzaddress").val(arr.live_place);
            $("#jxaddress").val(arr.native_place);
            $("#gj").val(arr.citizenship);
            var datas=["阿昌族","鄂温克族", "傈僳族", "水族", "白族", "高山族	", "珞巴族", "塔吉克族", "保安族	", "仡佬族", "满族", "塔塔尔族",
                "布朗族", "哈尼族", "毛南族	", "土家族	","布依族", "哈萨克族", "门巴族", "土族", "朝鲜族	", "汉族", "蒙古族	", "佤族", "达斡尔族",
                "赫哲族", "苗族", "维吾尔族", "傣族", "回族", "仫佬族", "乌孜别克族	", "德昂族	", "基诺族	", "纳西族", "锡伯族", "东乡族	", "京族","怒族",
                "瑶族", "侗族", "景颇族", "普米族", "彝族", "独龙族", "柯尔克孜族	", "羌族", "裕固族	", "俄罗斯族", "拉祜族	", "撒拉族	", "藏族", "鄂伦春族",
                "黎族", "畲族", "壮族"];
            if(arr.nation_code=="-1"){
                $("#mz").val("请选择")
            }else {
                $("#mz").val(datas[arr.nation_code-1]).attr("data-id",);
            }
            if(arr.faith_status=="-1"){
                $("#xy").val("请选择")
            }else {
                var str4="";
                if(arr.faith_status==1){
                    str4="无信仰"
                }else if(arr.faith_status==2){
                    str4="马列主义"
                }else if(arr.faith_status==3){
                    str4="基督教"
                }else if(arr.faith_status==4){
                    str4="佛教徒"
                }else if(arr.faith_status==5){
                    str4="道教"
                }else if(arr.faith_status==6){
                    str4="伊斯兰教"
                }else if(arr.faith_status==7){
                    str4="其他"
                }
                $("#xy").val(str4).attr("data-id",arr.faith_status);
            }
            if(arr.drink_status=="-1"){
                $("#yjqk").val("请选择")
            }else {
                var str5="";
                if(arr.drink_status==1){
                    str5="从不"
                }else if(arr.drink_status==2){
                    str5="偶尔"
                }else if(arr.drink_status==3){
                    str5="看情况"
                }else if(arr.drink_status==4){
                    str5="经常"
                }
                $("#yjqk").val(str5).attr("data-id",arr.drink_status);
            }
            if(arr.smoke_status=="-1"){
                $("#yjqk").val("请选择")
            }else {
                var str6="";
                if(arr.smoke_status==1){
                    str6="从不"
                }else if(arr.smoke_status==2){
                    str6="偶尔"
                }else if(arr.smoke_status==3){
                    str6="看情况"
                }else if(arr.smoke_status==4){
                    str6="经常"
                }
                $("#xyqk").val(str6).attr("data-id",arr.smoke_status);
            }
            if(arr.sibling_cnt=="-1"){
                $("#xdjms").val("")
            }else {
                $("#xdjms").val(arr.sibling_cnt)
            }
            var str7="";
            if(arr.family_rank==1){
                str7="老大"
            }else if(arr.family_rank==2){
                str7="老二"
            }else if(arr.family_rank==3){
                str7="老三"
            }else if(arr.family_rank==4){
                str7="老四"
            }else if(arr.family_rank==5){
                str7="老幺"
            }else if(arr.family_rank==6){
                str7="独生子女"
            }
            $("#xdph").val(str7).attr("data-id",arr.family_rank);
            if(arr.children_cnt=="-1"){
                $("#znsl").val("")
            }else {
                $("#znsl").val(arr.children_cnt)
            }
            var str8="";
            if(arr.children_status==-1){
                str8="请选择"
            }else if(arr.children_status==1){
                str8="无小孩"
            }else if(arr.children_status==2){
                str8="有小孩归自己"
            }else if(arr.children_status==3){
                str8="有小孩归对方"
            }
            $("#znqk").val(str8).attr("data-id",arr.children_status);

            if(arr.weight=="-1"){
                $("#tz").val("")
            }else {
                $("#tz").val(arr.weight)
            }

            var str9="";
            if(arr.blood_type==-1){
                str9="请选择"
            }else if(arr.blood_type==1){
                str9="A型"
            }else if(arr.blood_type==2){
                str9="B型"
            }else if(arr.blood_type==3){
                str9="AB型"
            }else if(arr.blood_type==4){
                str9="O型"
            }else if(arr.blood_type==5){
                str9="其他"
            }
            $("#xuexin").val(str9).attr("data-id",arr.blood_type);
            if(arr.house_cnt=="-1"){
                $("#fzsl").val("")
            }else {
                $("#fzsl").val(arr.house_cnt)
            }
            var str10="";
            if(arr.house_status==-1){
                str10="请选择"
            }else if(arr.house_status==1){
                str10="已购"
            }else if(arr.house_status==2){
                str10="未购"
            }else if(arr.house_status==3){
                str10="准备购入"
            }
            $("#sfgf").val(str10).attr("data-id",arr.house_status);
            if(arr.car_cnt=="-1"){
                $("#czsl").val("")
            }else {
                $("#czsl").val(arr.car_cnt)
            }
            var str11="";
            if(arr.car_status==-1){
                str11="请选择"
            }else if(arr.car_status==1){
                str11="已购"
            }else if(arr.car_status==2){
                str11="未购"
            }else if(arr.car_status==3){
                str11="准备购入"
            }
            $("#sfgc").val(str11).attr("data-id",arr.car_status);
            if(arr.wish_desc=="-1"){
                $("#xwt").val("")
            }else {
                $("#xwt").val(arr.wish_desc)
            }

            if(arr.id_card=="-1"){
                $("#sfz").val("")
            }else {
                $("#sfz").val(arr.id_card)
            }


            if(arr.junior_college_name=="-1"){
                $("#zkxx").val("")
            }else {
                $("#zkxx").val(arr.junior_college_name)
            }
            if(arr.college_name=="-1"){
                $("#bkxx").val("")
            }else {
                $("#bkxx").val(arr.college_name)
            }
            if(arr.postgraduate_college_name=="-1"){
                $("#ssxx").val("")
            }else {
                $("#ssxx").val(arr.postgraduate_college_name)
            }
            if(arr.doctor_college_name=="-1"){
                $("#bsxx").val("")
            }else {
                $("#bsxx").val(arr.doctor_college_name)
            }
        },
        error : function(err) {
            dealCPErrorResponse(err);
        }
    });

}
getxx();